package com.linkstec.musiccloud.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.linkstec.musiccloud.mapper.SonglistMapper;
import com.linkstec.musiccloud.pojo.ListSongUser;
import com.linkstec.musiccloud.pojo.Song;
import com.linkstec.musiccloud.pojo.User;
import com.linkstec.musiccloud.service.SonglistService;
import com.linkstec.musiccloud.vo.SongListVos;

@Service
public class SonglistServiceImpl implements SonglistService{

	@Autowired
	private SonglistMapper songlistMapper;
	
	@Override
	public List<SongListVos> toIndexView() {
		return songlistMapper.toIndexView();
	}

	@Override
	public List<SongListVos> selectSongListByType() {
		return songlistMapper.selectSongListByType();
		
	}

	@Override
	public void addListCounts(ListSongUser listSongUser) {
		songlistMapper.addListCounts(listSongUser);
		
	}

	@Override
	public List<SongListVos> selectListByUser(User user) {
		return songlistMapper.selectListByUser(user);
	}

	@Override
	public ListSongUser songIntoListCheck(int songId, int listId, int userId) {
		return songlistMapper.songIntoListCheck(songId,listId,userId);
	}

	@Override
	public void songIntoList(int songId, int listId, int userId) {
		songlistMapper.songIntoList(songId,listId,userId);
	}


	@Override
	public List<SongListVos> selectList(int userId) {
		return songlistMapper.selectList(userId);
	}

	@Override
	public List<SongListVos> selectListsBySongId(int songId) throws RuntimeException {
		return songlistMapper.selectListsBySongId(songId);
	}

}
